<%@ page import="com.Bean.Server" %>
<%@ page import="com.Bean.User" %>
<%@ page import="com.Util.DB" %>
<%@ page import="com.Util.ServerDao" %>
<%@ page import="com.Util.UserDao" %>
<%@ page import="java.util.Set" %>

<%--
  Created by IntelliJ IDEA.
  User: root
  Date: 19-6-23
  Time: 下午8:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    boolean istest = DB.jsptest;

    String tkid = new String();
    String username = new String();
    User user = new User();
    if (istest) {
        username = request.getParameter("u");
    } else if (session.getAttribute("username") == null) {
        response.sendRedirect("../login.jsp");
        //request.getRequestDispatcher("../login.jsp").forward(request, response);
    } else {
        username = session.getAttribute("username").toString();
    }
    user = UserDao.selectUser(username);

%>
<html>
<head>
    <title>Tickets内容</title>
    <link rel="stylesheet" href="../css/all.min.css">
    <script type="text/javascript" charset="utf8" src="../js/scripts.min.js"></script>
</head>
<section id="header">
    <div class="container">
        <ul class="top-nav">
            <li class="primary-action">
                <a href="../logout" class="btn">
                    注销
                </a>
            </li>
        </ul>
    </div>
</section>
<section>
    <nav id="nav" class="navbar navbar-default navbar-main" role="navigation">
        <div class="container">

            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#primary-nav">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>

            <div class="collapse navbar-collapse" id="primary-nav">
                <ul class="nav navbar-nav">
                    <li menuitemname="Home" class="" id="Primary_Navbar-Home">
                        <a href="../index.html">
                            主页
                        </a>
                    </li>

                    <li menuitemname="Services" class="dropdown" id="Primary_Navbar-Services">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            服务
                            &nbsp;<b class="caret"></b> </a>
                        <ul class="dropdown-menu">
                            <li menuitemname="pm-addon-overview" id="Primary_Navbar-Services-pm-addon-overview">
                                <a href="./myvps.jsp">
                                    我的vps
                                </a>
                            </li>
                            <li menuitemname="My Services" id="Primary_Navbar-Services-My_Services">
                                <a href="./tickets.jsp">
                                    服务咨询
                                </a>
                            </li>
                            <li menuitemname="My Services">
                                <a href="./openticket.jsp">
                                    咨询客服
                                </a>
                            </li>

                        </ul>
                    </li>

                    <li menuitemname="Home" class="" id="Primary_Navbar-Home">
                        <a href="./ordervps.jsp">
                            购买VPS
                        </a>
                    </li>

                </ul>
            </div>
        </div>
    </nav>
</section>
<section id="main-body">
    <div class="container">
        <div class="row">
            <div class="col-md-9 pull-md-right">
                <div class="header-lined">
                    <h1>购买服务器
                        <small>服务器方案</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li>
                            <a href="../index.html"> 主页
                            </a></li>
                        <li>
                            <a href="#"> 服务
                            </a></li>
                        <li class="active">
                            选择方案
                        </li>
                    </ol>
                </div>
            </div>
            <div class="col-md-3 pull-md-left sidebar">
                <div menuitemname="Client Details" class="panel panel-sidebar panel-sidebar">
                    <div class="panel-heading">
                        <h3 class="panel-title">
                            <i class="fas fa-user"></i>&nbsp; 我的信息
                            <i class="fas fa-chevron-up panel-minimise pull-right"></i>
                        </h3>
                    </div>

                    <div class="panel-body">
                        <strong><%=user.getUsername()%></strong><br>
                        <%=user.getEmail()%><br>
                        <%=user.getFamilyname()%> <%=user.getName()%><br>
                    </div>
                    <div class="panel-footer clearfix">
                    </div>
                </div>
            </div>
            <div class="col-md-9 pull-md-right main-content">
                <div class="categories-collapsed visible-xs visible-sm clearfix">
                    <div class="pull-left form-inline">
                        <form method="get" action="/cart.php">
                            <select name="gid" onchange="submit()" class="form-control">
                                <optgroup label="Product Categories">
                                    <option value="2" selected="selected">Cpanel/PHP</option>
                                    <option value="14">Plesk/ASP.NET</option>
                                    <option value="5">FTP</option>
                                    <option value="8">Email hosting</option>
                                    <option value="10">SSL</option>
                                    <option value="26">License</option>
                                    <option value="27">VPS</option>
                                </optgroup>
                                <optgroup label="Actions">
                                    <option value="addons">Product Addons</option>
                                    <option value="renewals">Domain Renewals</option>
                                    <option value="registerdomain">Register a New Domain</option>
                                    <option value="transferdomain">Transfer in a Domain</option>
                                    <option value="viewcart">View Cart</option>
                                </optgroup>
                            </select>
                        </form>
                    </div>
                </div>
                <form method="get" action="../addserver">
                <div class="row">
                    <div class="form-group col-sm-10">
                        <label for="inputSubject">服务器名</label>
                        <input type="text" name="name" id="inputSubject" value="" class="form-control">
                    </div>
                </div>
                <div class="row">
                    <div class="form-group col-sm-3">
                        <label for="inputDepartment">系统类型</label>
                        <input type="hidden" name="username" value="<%=user.getUsername()%>">
                        <select name="osname" id="inputDepartment" class="form-control" onchange="refreshCustomFields(this)">
                            <option value="centos" selected="selected">
                                Centos
                            </option>
                            <option value="archlinux" selected="selected">
                                ArchLinux
                            </option>
                            <option value="ubuntu" selected="selected">
                                Ubuntu Server
                            </option>
                            <option value="openbsd" selected="selected">
                                OpenBSD
                            </option>
                            <option value="windows" selected="selected">
                                Windows Server
                            </option>
                        </select>
                    </div>
                </div>
                <div class="products" id="products">
                    <div class="row row-eq-height">
                        <div class="col-md-6">
                            <div class="product clearfix" id="product1">
                                <header>
                                    <span id="product1-name">方案一</span>
                                    <input type="radio" name="kind" value="1">
                                </header>
                                <div class="product-desc">
                                    <ul>
                                        <li id="product1-feature1">
                                            <span class="feature-value">LXC</span>
                                            架构
                                        </li>
                                        <li id="product1-feature2">
                                            <span class="feature-value">1 个</span>
                                             IPV4
                                        </li>
                                        <li id="product1-feature3">
                                            <span class="feature-value">1 个</span>
                                            核心
                                        </li>
                                        <li id="product1-feature4">
                                            <span class="feature-value">2.3Hz</span>
                                             主频
                                        </li>
                                        <li id="product1-feature5">
                                            <span class="feature-value">512M</span>
                                            内存
                                        </li>
                                    </ul>
                                </div>
                                <footer>
                                    <div class="product-pricing" id="product1-price">

                                        <span class="price">月付18元</span>
                                    </div>
                                </footer>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="product clearfix" id="product1">
                                <header>
                                    <span id="product2-name">方案二</span>
                                    <input type="radio" name="kind" value="2">
                                </header>
                                <div class="product-desc">
                                    <ul>
                                        <li id="product2-feature1">
                                            <span class="feature-value">KVM</span>
                                            架构
                                        </li>
                                        <li id="product1-feature2">
                                            <span class="feature-value">1 个</span>
                                             IPV4
                                        </li>
                                        <li id="product1-feature3">
                                            <span class="feature-value">2 个</span>
                                            核心
                                        </li>
                                        <li id="product1-feature4">
                                            <span class="feature-value">2.3Hz</span>
                                             主频
                                        </li>
                                        <li id="product1-feature5">
                                            <span class="feature-value">1G</span>
                                            内存
                                        </li>
                                    </ul>
                                </div>
                                <footer>
                                    <div class="product-pricing" id="product1-price">
                                        <span class="price">月付43元</span>
                                    </div>

                                </footer>
                            </div>
                        </div>
                    </div>
                    <div class="row row-eq-height">
                        <div class="col-md-6">
                            <div class="product clearfix" id="product1">
                                <header>
                                    <span id="product1-name">方案三</span>
                                    <input type="radio" name="kind" value="3">
                                </header>
                                <div class="product-desc">
                                    <ul>
                                        <li id="product1-feature1">
                                            <span class="feature-value">KVM</span>
                                            架构
                                        </li>
                                        <li id="product1-feature2">
                                            <span class="feature-value">1 个</span>
                                             IPV4
                                        </li>
                                        <li id="product1-feature3">
                                            <span class="feature-value">4 个</span>
                                            核心
                                        </li>
                                        <li id="product1-feature4">
                                            <span class="feature-value">3.3Hz</span>
                                             主频
                                        </li>
                                        <li id="product1-feature5">
                                            <span class="feature-value">2G</span>
                                            内存
                                        </li>
                                    </ul>
                                </div>
                                <footer>
                                    <div class="product-pricing" id="product1-price">
                                        <span class="price">月付120元</span>
                                    </div>

                                </footer>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="product clearfix" id="product1">
                                <header>
                                    <span id="product1-name">方案四</span>
                                    <input type="radio" name="kind" value="4">
                                </header>
                                <div class="product-desc">
                                    <ul>
                                        <li id="product1-feature1">
                                            <span class="feature-value">KVM</span>
                                            架构
                                        </li>
                                        <li id="product1-feature2">
                                            <span class="feature-value">1 个</span>
                                             IPV4
                                        </li>
                                        <li id="product1-feature3">
                                            <span class="feature-value">8 个</span>
                                            核心
                                        </li>
                                        <li id="product1-feature4">
                                            <span class="feature-value">3.3Hz</span>
                                             主频
                                        </li>
                                        <li id="product1-feature5">
                                            <span class="feature-value">4G</span>
                                            内存
                                        </li>
                                    </ul>
                                </div>
                                <footer>
                                    <div class="product-pricing" id="product1-price">
                                        <span class="price">月付240元</span>
                                    </div>

                                </footer>
                            </div>
                        </div>
                    </div>
                    <input type="submit" id="openTicketSubmit" value="提交" class="btn btn-primary">
                </div>
                </form>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>

</section>
</body>
</html>
